package com.finance.scheduler.job;

import com.finance.framework.qurtz.TaskDescriptor;
import com.finance.logistics.anlyzier.ChooseByTypeHandler;
import com.finance.scheduler.service.AbstractTask;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;



/**
 * 抽取已经拉取的运单信息
 */
@Component
@DisallowConcurrentExecution
public class ErrorDataReAnalyzeJob implements AbstractTask{
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ChooseByTypeHandler chooseByTypeHandler;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        logger.info("**********************解析错误数据重新解析调度开始执行*********************");
        this.chooseByTypeHandler.getErrorType();
        logger.info("**********************解析错误数据重新解析调度结束执行*********************");
    }

    @Override
    public TaskDescriptor descriptor() {
        return new TaskDescriptor("解析失败数据再解析","default","analyzeErrorData_trigger","analyzeErrorData_trigger","0 0 0 4 * ?",this.getClass().getCanonicalName(),"处理已经解析错误的数据");
    }
}
